namespace KL.Standard.Core.Utilities.Excel;

/// <summary>
/// 在viewmodel的对象添加该属性
/// </summary>
[AttributeUsage(AttributeTargets.Property, Inherited = true)]
public class VTabClmAttribute:System.Attribute
{
    public VTabClmAttribute(string clmLabel)
    {
        this.ClmLabel = clmLabel;
    }
        
    // public VTblColumnAttribute(string label, int orderSeq)
    // {
    //     this.Label = label;
    //     this.OrderSeq = orderSeq;
    // }
        
    // public VTblColumnAttribute(string label, int orderSeq,int width)
    // {
    //     this.Label = label;
    //     this.OrderSeq = orderSeq;
    //     this.Width = width;
    // }
    public VTabClmAttribute(string clmLabel, int orderSeq=0,int clmWidth=100,bool isFilt4Clm=false,string clmBg=null,bool isCompare= false)
    {
        this.ClmLabel = clmLabel;
        this.OrderSeq = orderSeq;
        this.ClmWidth = clmWidth;
        this.IsFilt4Clm = isFilt4Clm;
        this.ClmBg = clmBg;
        this.IsCompare = isCompare;
    }
    /// <summary>
    /// 标题
    /// </summary>
    public string ClmLabel { set; get; }
    /// <summary>
    /// 宽度
    /// </summary>
    public int? ClmWidth { set; get; }

    public int? OrderSeq { set; get; }

    public bool IsFilt4Clm { set; get; } = false;
        
    /// <summary>
    /// 背景色
    /// </summary>
    public string ClmBg { get; set; }

    public bool IsCompare { set; get; }
}